Infeasible Code Detection
نویسندگان
چکیده
A piece of code in a computer program is infeasible if it cannot be part of any normallyterminating execution of the program. We develop an algorithm for the automatic detection of all infeasible code in a program. We first translate the task of determining all infeasible code into the problem of finding all statements that can be covered by a feasible path. We prove that in order to identify all coverable statements, it is sufficient to find all coverable statements within a certain minimal subset. For this, our algorithm repeatedly queries an oracle, asking for the infeasibility of specific sets of control-flow paths. We present a sound implementation of the proposed algorithm on top of the Boogie program verifier utilizing a theorem prover to provide the oracle required by the algorithm. We show experimentally a drastic decrease in the number of theorem prover queries compared to existing approaches, resulting in an overall speedup of the entire computation. Cristiano Bertolini is a postdoctoral research fellow of the rCOS group at UNU-IIST. His research interest is in the area of user interface testing, static analysis and modeling languages. [email protected]. Martin Schäf is a postdoctoral research fellow of the rCOS group at UNU-IIST. His research interest is in the area of program verification, static analysis and runtime verification. [email protected]. Pascal Schweitzer is a CS Visiting Fellow at the Research School of Computer Science. The Australian National University. His research interest is in the area of algorithmic graph theory, geometric group theory, and graph isomorphisms. [email protected]. Copyright c © 2011 by UNU-IIST
منابع مشابه
Joogie: Infeasible Code Detection for Java
We present Joogie, a tool that detects infeasible code in Java programs. Infeasible code is code that does not occur on feasible control-flow paths and thus has no feasible execution. Infeasible code comprises many errors detected by static analysis in modern IDEs such as guaranteed null-pointer dereference or unreachable code. Unlike existing techniques, Joogie identifies infeasible code by pr...
متن کاملHeuristic Approach of Automated Test Data Generation For Programs Having Array Of Different Dimensions and Loops With Variable Number Of Iteration
In software testing, loops are important spot for error detection. Execution of program spend large amount of time in loops. Without covering paths going through loops we can not get better code coverage. Most of the mistakes are made in loops of programs. Infinite loop creates lots of problem in detecting the errors. In fact, it is impossible to detect all kinds of infinite looping automatical...
متن کاملInfeasible path generalization in dynamic symbolic execution
Context: Automatic code-based test input generation aims at generating a test suite ensuring good code coverage. Dynamic Symbolic Execution (DSE) recently emerged as a strong code-based testing technique to increase coverage by solving path conditions with a combination of symbolic constraint solving and concrete executions. Objective: When selecting paths in DSE for generating test inputs, som...
متن کاملReconstructing Paths for Reachable Code
Infeasible code has proved to be an interesting target for static analysis. It allows modular and scalable analysis, and at the same time, can be implemented with a close-to-zero rate of false warnings. The challenge for an infeasible code detection algorithm is to find executions that cover all statements with feasible executions as fast as possible. The remaining statements are infeasible cod...
متن کاملSimplifying WCET Analysis By Code Transformations
Determining worst case execution time of a program by static analysis is important for the design of real-time software. WCET analysis at the programming language level requires the detection of the longest path in the program. A tighter bound on the WCET of a program can be achieved by identifying the infeasible paths in the program’s control flow, which is a difficult problem. Due to the bran...
متن کامل